package asa;

public class AssignmentStatement extends Statement {

    public AssignmentStatement( VariableExpr variableExpr, Expr expr ) {
        this.variableExpr = variableExpr;
        this.expr = expr;
    }

    @Override
	public void genJava(PWInterface pw) {
		genJava(pw, null);
	}

	@Override
	public void genJava(PWInterface pw, Env env) {
		pw.printIdent("");
    	variableExpr.genJava(pw);
    	pw.print(" = ");
    	expr.genJava(pw);
    	pw.println(";");
    }
    private VariableExpr variableExpr;
    private Expr expr;
}